package com.github.tangyi.api.exam.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.github.tangyi.common.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;

/**
 * 课程完结证书 course_cert
 */
@Data
@Table(name = "course_cert")
@EqualsAndHashCode(callSuper = true)
public class CourseCert extends BaseEntity<CourseCert> {

    /**
     * 课程id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Column(name = "course_id")
    private Long courseId;

    /**
     * 考试id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Column(name = "exam_id")
    private Long examId;

    /**
     * 考试id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Column(name = "user_id")
    private Long userId;

    /**
     * 证书文件
     */
    @Column(name = "cert_file")
    private String certFile;

}
